package com.sf.dlb.mongo.repository;

import com.sf.dlb.mongo.model.NewList;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 新闻列表 NewListRepository
 *
 * Created by jing.tan on 2018/5/21.
 */
@Repository
public interface NewListRepository  extends MongoRepository<NewList,String>{

    /**
     * 根据title+coverUrl查询新闻
     * @param title
     * @param delFlag
     * @return
     */
    List<NewList> findByTitleOrCoverUrlAndDelFlag(String title, String coverUrl, String delFlag);
}